<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:61:"E:\www\sunwm\web/../application/admin\view\index\setting.html";i:1517629635;s:61:"E:\www\sunwm\web/../application/admin\view\public\header.html";i:1503189484;s:61:"E:\www\sunwm\web/../application/admin\view\public\footer.html";i:1512624954;}*/ ?>
﻿<!DOCTYPE html>
<html lang="zh-cn">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<meta name="renderer" content="webkit">
		<title><?php echo config('sitename'); ?>-<?php echo lang('label')['Login_title']; ?></title>
		<link rel="stylesheet" type="text/css" href="__ROOT__/static/public/css/pintuer.css" />
		<link rel="stylesheet" type="text/css" href="__ROOT__/static/admin/css/admin.css" />
		<script type="text/javascript" src="__ROOT__/static/public/js/jquery.js"></script>
		<script type="text/javascript" src="__ROOT__/static/public/js/pintuer.js"></script>
		<script type="text/javascript" src="__ROOT__/static/admin/js/admin.js"></script>
		<script type="text/javascript" src="__ROOT__/static/public/layer/layer.js"></script>
		<script type="text/javascript" src="__ROOT__/static/public/laydate/laydate.js"></script>
		<script type="text/javascript" src="__ROOT__/static/public/laytpl/laytpl.js"></script>
	</head>

	<body>
	<style>
		html { overflow-x:hidden; }
	</style>
<div class="tab">
    <div class="tab-head">
        <strong>系统设置</strong>
        <ul class="tab-nav">
            <li <?php if($tab=='' || $tab == 'setting'): ?>class="active"<?php endif; ?>><a href="#tab-setting">系统设置</a></li>
            <li <?php if($tab=='version'): ?>class="active"<?php endif; ?>><a href="#tab-version">版本更新</a></li>
        </ul>
    </div>
    <div class="tab-body">
        <br/>
        <div class="tab-panel <?php if($tab == 'version'): ?>active<?php endif; ?>" id="tab-version" style="float: left;margin-left: 30px">
            <form method="post" class="form-x" enctype="multipart/form-data" action="?tab=version">
                <input type="hidden" name="edit" value="version">
                <div class="form-group">
                    <div class="label">
                        <label>终端类型</label>
                    </div>
                    <div class="field">
                        <select name="type" class="input input-auto">
                            <option value="user">用户端</option>
                            <option value="seller">商家端</option>
                            <option value="express">配送端</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label>上传apk</label>
                    </div>
                    <div class="field">
                        <input type="file" id="apk" name="apk" data-validate="required:请上传apk"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label>版本号</label>
                    </div>
                    <div class="field">
                        <input type="text" class="input input-auto" id="version" name="version" size="80"
                               placeholder="例如 1.0.1" style="width: 120px;" data-validate="required:请填写版本号"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label>是否强制更新</label>
                    </div>
                    <div class="field">
                        <div class="button-group radio">
                            <label class="button">
                                <input type="radio" name="constraint" value="1"><span class="icon icon-check"></span> 是
                            </label>
                            <label class="button active">
                                <input type="radio" name="constraint" value="0" checked><span class="icon icon-times"></span> 否
                            </label>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label>描述</label>
                    </div>
                    <div class="field">
                        <textarea name="description" class="input input-auto" rows="5" cols="80" placeholder="请填写描述"
                                  data-validate="required:请填写描述"></textarea>
                    </div>
                </div>
                <div class="form-button">
                    <button class="button bg-main" type="submit">提交</button>
                </div>
            </form>
        </div>
        <div class="tab-panel <?php if($tab == '' || $tab == 'setting'): ?>active<?php endif; ?>" id="tab-setting">
            <form method="post" class="form-x" enctype="multipart/form-data" action="?tab=setting">
                <div class="form-group">
									<div class="label">
										<label>配送</label>
									</div>
									<div class="field">
										<div class="button-group button-group-small radio">
											<label class="button <?php if($data['express_type']== 1 || !$data['express_type']): ?>active<?php endif; ?>">
													<input name="express_type" value="1" <?php if($data['express_type']== 1 || !$data['express_type']): ?>checked="checked"<?php endif; ?> type="radio"><span class="icon icon-check"></span> 平台配送
											</label>
											<label class="button <?php if($data['express_type'] == 2): ?>active<?php endif; ?>">
											<input name="express_type" value="2" <?php if($data['express_type']== 2): ?>checked="checked"<?php endif; ?> type="radio"><span class="icon icon-check"></span> 达达配送
											</label>
										</div>
									</div>
								</div>
                <div class="form-group">
									<div class="label">
										<label>分销</label>
									</div>
									<div class="field">
										<div class="button-group button-group-small radio">
											<input class="input input-auto" name="level_1" placeholder="一级" value="<?php echo $data['level_1']; ?>"/>% &nbsp;<input class="input input-auto" name="level_2" placeholder="二级" value="<?php echo $data['level_2']; ?>"/>% &nbsp;<input class="input input-auto" name="level_3" placeholder="三级" value="<?php echo $data['level_3']; ?>"/>% 
										</div>
									</div>
								</div>
                <div class="form-button">
                    <button class="button bg-main" type="submit">提交</button>
                </div>
            </form>
        </div>
    </div>
</div>
<p class="text-center text-gray" style="margin-top:10px;"><a class="text-gray" target="_blank" href="http://www.wm0530.com">完美外卖系统 Power by 网络工厂</a></p>
</body>
<script>
$('.upload').on('click',function (){
		var id = $(this).attr('data-id');
		 upload(id);
	}
);
function upload(id){
	layer.open({
		type:2,
		title:false,
		area: ['70%', '90%'],
		offset: '5%',
		content: "<?php echo url('/admin/material'); ?>?id="+id
	});
}
</script>
</html>